/*
Copyright (c) [2024] [423109070325 FuZhifeng.etc]
[OVERPASS] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan
PSL v2.
You may obtain a copy of Mulan PSL v2 at:
         http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/

#pragma once

#include"HuffmanTree.h"



void main_menu();
void tital();
void backpack();
void welcome();
void sleepMilliseconds(int milliseconds);
void showProgressBar(int durationInSeconds);
void printCharData(const CharData& charData);
bool openFile(const std::string& filePath);
void encryptFileWithHuffmanCodes(const string& inputFilePath, const string& outputFilePath, const HuffmanTree& HT, const vector<char>& characters, const vector<string>& huffmanCodes);
void GenerateTreeRepresentation(const HuffmanTree& HT, int root, const vector<char>& characters, int depth, string& output);
void SaveHuffmanTreeAsTreeShape(const HuffmanTree& HT, const vector<char>& characters, const string& filePath);
void decryptFileWithHuffmanCodes(const string& inputFilePath, const string& outputFilePath, const HuffmanTree& HT, const vector<char>& characters, const vector<string>& huffmanCodes);